package cn.bone.ou.community.param;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

public class MngParam {

    @Data
    public static class LoginParam{
        @NotNull
        @Length(min = 11,max = 11, message = "手机号需要为11位数字")
        private String phoneNum;
        @NotNull
        @Length(min = 6,max = 12)
        private String password;
    }

    @Data
    public static class InfoParam {
        @NotNull
        private Integer mngId;
    }

    @Data
    public static class ModifyHeadImgParam {
        @NotNull
        private Integer mngId;
        @NotNull
        private String headImg;
    }

    @Data
    public static class ModifyRealNameParam{
        @NotNull
        private Integer mngId;
        @NotNull
        @Length(min=2,max=20)
        private String realName;
    }

    @Data
    public static class ModifyPhoneNumParam {
        @NotNull
        private Integer mngId;
        @NotNull
        @Length(min = 11,max = 11,message = "手机号需要为11位数字")
        private String phoneNum;
    }

    @Data
    public static class ModifyPassParam {
        @NotNull
        private Integer mngId;
        @NotNull
        @Length(min = 6,max = 12)
        private String password;
        @NotNull
        @Length(min = 6,max = 12)
        private String newPass;
    }

    @Data
    public static class ListParam {
        @NotNull
        private Integer communityId;
        @NotNull
        private Integer start;
        @NotNull
        private Integer num;
    }

    @Data
    public static class AddParam {
        @NotNull
        private Integer communityId;
        @NotNull
        private String realName;
        @NotNull
        @Length(min = 11,max = 11, message = "手机号长度为11")
        private String phoneNum;
        @NotNull
        private String password;        //密码
    }

    @Data
    public static class ModifyParam {
        @NotNull
        private Integer mngId;
        @NotNull
        private String realName;
        @NotNull
        private String phoneNum;
    }

    @Data
    public static class DeleteParam {
        @NotNull
        private Integer mngId;
    }

    @Data
    public static class UsableParam {
        @NotNull
        private Integer mngId;
    }

    @Data
    public static class DisableParam {
        @NotNull
        private Integer mngId;
    }

    @Data
    public static class ResetPassParam {
        @NotNull
        private Integer mngId;
        @NotNull
        private String newPass;
    }
}
